package ED2;

import java.awt.Color;
import java.awt.Paint;

public final class Edge
{   private int id;
    public static final Paint DEFAULT_COLOR = Color.BLACK;
    
    private static int _id = 0;
    private AlunoBean idAluno;
    private AlunoBean destAluno;
    private Paint cor;
    
    public Edge(){
        this(null, null);
    }
    
    public Edge(AlunoBean idAluno, AlunoBean destAluno){
        id = ++_id;
        cor = DEFAULT_COLOR;
        
        this.idAluno = idAluno;
        this.destAluno = destAluno;
    }
    
    public int getId(){
        return id;
    }
    
    public Paint getColor(){
        return cor;
    }
    
    public void setColor(Paint color){
        this.cor = cor;
    }
    
    public AlunoBean getCodigoAluno(){
        return idAluno;
    }
    
    public void setCodigoAluno(AlunoBean codigoAluno){
        this.idAluno = idAluno;
    }
    
    public AlunoBean getTargetAluno(){
        return destAluno;
    }
    
    public void setTargetAluno(AlunoBean destAluno){
        this.destAluno = destAluno;
    }
    
    @Override
    public String toString(){
        return "E" + id;
    }
}
